import 'dart:io';
import 'dart:ui';

class  Device {
  static final _width = window.physicalSize.width;
  static final _height =window.physicalSize.height;
  static final bool isIOS = Platform.isIOS;
  static final bool isAndroid = Platform.isAndroid;
  static final bool isIPhoneXR = (isIOS && ((_height == 896 && _width == 414) || (_height == 414 && _width == 896)));
  static final bool isIPhoneXS = (isIOS && ((_height == 812 && _width == 375) || (_height == 375 && _width == 812)));
  static final bool isIPhoneXSMax = (isIOS && ((_height == 896 && _width == 414) || (_height == 414 && _width == 896)));
  static final bool isIPhoneX = (isIPhoneXS || isIPhoneXR || isIPhoneXSMax);
  static final double statusBarHeight = (isIOS && (isIPhoneXS || isIPhoneXR || isIPhoneXSMax)) ? 44 : 20;
  static final double navigationBarHeight = (isIOS && (isIPhoneXS || isIPhoneXR || isIPhoneXSMax)? 84 : 64);
}